home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / doom / turric03.zip / TURRIC03.ZIP / PROGS / JSUBS.QC < prev    next >
Text File  |  1996-12-31  |  2KB  |  80 lines

  1. //** PATCH_BEGIN - gibbin3 ****
  2. // Subroutines for gib related stuff.
  3.  
  4. // prototypes
  5. void(string gibname, float dm) ThrowGib;
  6. void(vector org, vector vel) SpawnMeatSpray;
  7. float() random;
  8.  
  9. void() SUB_Gib =
  10. {
  11.         local vector x, y, v;
  12.         x='1 0 0';
  13.         y='0 1 0';
  14.         v=x*(50-random()*100)+y*(50-random()*100);
  15.         if (random() < 0.8)
  16.            SpawnMeatSpray(self.origin, v);
  17.  
  18.         else if (random() < 0.3)
  19.                 ThrowGib("progs/gib1.mdl", self.health*3);
  20.         else if (random() < 0.5)
  21.                 ThrowGib("progs/gib2.mdl", self.health*3);
  22.         else
  23.                 ThrowGib("progs/gib3.mdl", self.health*3);
  24. };
  25.  
  26. ///////
  27. void() SUB_Gib1 =
  28. {
  29.        local vector x, y, v;
  30.         x='1 0 0';
  31.         y='0 1 0';
  32.         v=x*(50-random()*100)+y*(50-random()*100);
  33.         if (random() < 0.8)
  34.            SpawnMeatSpray(self.origin, v);
  35.  
  36.         else if (random() < 0.3)
  37.                 ThrowGib("progs/gib3.mdl", self.health*3);
  38.         else if (random() < 0.5)
  39.                 ThrowGib("progs/zom_gib.mdl", self.health*3);
  40.         else
  41.                 ThrowGib("progs/gib3.mdl", self.health*3);
  42. };
  43.  
  44.  
  45. ///////
  46. void() SUB_Gib2 =
  47. {
  48.         local vector x, y, v;
  49.         x='1 0 0';
  50.         y='0 1 0';
  51.         v=x*(50-random()*100)+y*(50-random()*100);
  52.         if (random() < 0.8)
  53.            SpawnMeatSpray(self.origin, v);
  54.  
  55.         else if (random() < 0.3)
  56.                 ThrowGib("progs/zom_gib.mdl", self.health*3);
  57.         else if (random() < 0.5)
  58.                 ThrowGib("progs/zom_gib.mdl", self.health*3);
  59.         else
  60.                 ThrowGib("progs/gib3.mdl", self.health);
  61. };
  62.  
  63. //** PATCH_END - gibbin3 ******
  64.  
  65. //** PATCH_BEGIN - gibbin3 - Turrican ****
  66. void () SUB_SmallGib =
  67. {
  68.     ThrowGib("progs/zom_gib.mdl", self.health*3);
  69. };
  70.  
  71. //** PATCH_END - gibbin3 - Turrican ******
  72.  
  73. //** PATCH_BEGIN - temporary entity limiting - Turrican ****
  74. void () SUB_RemoveTempEnt =
  75. {
  76.     current_temp_entities = current_temp_entities - 1;
  77.     remove(self);
  78. };
  79. //** PATCH_END - temporary entity limiting - Turrican ******
  80.